﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Tareas.aspx.cs" Inherits="Tareas_Tareas" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ext:Store ID="sTareas" runat="server">
    <Reader>
        <ext:JsonReader ReaderID="Tarea">
            <Fields>
            <ext:RecordField Name="Id" />
                <ext:RecordField Name="Nombre" />
                <ext:RecordField Name="Descripcion" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server" Theme="Gray">
    </ext:ScriptManager>
    
    <ext:ViewPort ID="ViewPort1" runat="server">
        <Body>
            <ext:BorderLayout ID="BorderLayout1" runat="server">
                <Center>
                    <ext:GridPanel runat="server" Border="false" ID="gpPerfilProyecto" StoreID="sTareas"
                        Height="380" EnableColumnHide="false" StripeRows="true" TrackMouseOver="true" AutoExpandColumn="Descripcion">
                        <%--<TopBar>
                            <ext:Toolbar ID="tobListadoTareas" runat="server">
                                <Items>
                                    <ext:Button runat="server" ID="btnNuevo" Text="Listado de Tareas" Icon="Add">
                                        <AjaxEvents>
                                            <Click OnEvent="btnNuevo_click">
                                                <ExtraParams>
                                                                                <ext:Parameter Name="operacion" Value="Nuevo">
                                                                                </ext:Parameter>
                                                                            </ExtraParams>
                                            </Click>
                                        </AjaxEvents>
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>--%>
                        <ColumnModel ID="clmListadoTareas" runat="server">
                            <Columns>
                                <ext:RowNumbererColumn Width="20">
                                </ext:RowNumbererColumn>
                                <ext:Column ColumnID="NombreProyecto" Header="Tarea" Width="200" DataIndex="Nombre" />
                                <ext:Column ColumnID="Descripcion" Header="Estado" Width="300" DataIndex="Descripcion" />
                                <ext:CommandColumn Width="40">
                                    <Commands>
                                        <ext:GridCommand ToolTip-Text="Ver Tarea" Icon="PageEdit" CommandName="Ver">
                                        </ext:GridCommand>
                                    </Commands>
                                </ext:CommandColumn>
                            </Columns>
                        </ColumnModel>
                        <LoadMask ShowMask="true" />
                        <SaveMask ShowMask="true" />
                        <%--<AjaxEvents>
                                                        <Command OnEvent="Editar_Click">
                                                            <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{gpPerfilProyecto}.body}" />
                                                            <ExtraParams>
                                                                <ext:Parameter Name="id" Value="record.data.Id" Mode="Raw" />
                                                                <ext:Parameter Name="operacion" Value="Editar" />
                                                            </ExtraParams>
                                                        </Command>
                                                    </AjaxEvents>--%>
                        <SelectionModel>
                            <ext:RowSelectionModel ID="RowSelectionModel" runat="server" SingleSelect="true">
                            </ext:RowSelectionModel>
                        </SelectionModel>
                    </ext:GridPanel>
                </Center>
            </ext:BorderLayout>
        </Body>
    </ext:ViewPort>
    </form>
</body>
</html>
<ext:Window ID="wListadoTareas" runat="server" Title="Listado de Tareas" ShowOnLoad="false"
    CenterOnLoad="true" Y="10" Modal="true" BodyStyle="padding:10px;" Width="600"
    AutoHeight="true" ButtonAlign="Center">
    <Body>
        <ext:FormLayout ID="FormLayout8" runat="server" LabelAlign="Left" LabelWidth="160">
            <ext:Anchor Horizontal="100%">
                <ext:Panel ID="Pane1" runat="server" AutoHeight="true" Border="false">
                    <Body>
                        <ext:ColumnLayout ID="ColumnLayout1" runat="server">
                            <ext:LayoutColumn ColumnWidth=".5">
                                <ext:Panel ID="Panel3" runat="server" Border="false" Header="false" BodyStyle="padding:10px;">
                                    <Body>
                                        <ext:FormLayout ID="FormLayout2" runat="server" LabelAlign="left" LabelWidth="50">
                                            <ext:Anchor Horizontal="100%">
                                                <ext:TextField ID="txtNombre" runat="server" FieldLabel="Nombre">
                                                </ext:TextField>
                                            </ext:Anchor>
                                        </ext:FormLayout>
                                    </Body>
                                </ext:Panel>
                            </ext:LayoutColumn>
                            <ext:LayoutColumn ColumnWidth=".5">
                                <ext:Panel ID="Panel4" runat="server" Border="false" Header="false" BodyStyle="padding:10px;">
                                    <Body>
                                        <ext:FormLayout ID="FormLayout3" runat="server" LabelAlign="left" LabelWidth="50">
                                            <ext:Anchor Horizontal="100%">
                                                <ext:TextField ID="txtFecha" FieldLabel="Fecha" runat="server">
                                                </ext:TextField>
                                            </ext:Anchor>
                                        </ext:FormLayout>
                                    </Body>
                                </ext:Panel>
                            </ext:LayoutColumn>
                        </ext:ColumnLayout>
                    </Body>
                </ext:Panel>
            </ext:Anchor>
            <ext:Anchor Horizontal="100%">
                <ext:Panel ID="Panel1" runat="server" AutoHeight="true" Border="false" BodyStyle="padding:10px;">
                    <Body>
                        <ext:FormLayout ID="FormLayout1" runat="server" LabelAlign="Top">
                            <ext:Anchor Horizontal="100%">
                                <ext:TextArea ID="txtDescripcion" runat="server" FieldLabel="Descripción">
                                </ext:TextArea>
                            </ext:Anchor>
                        </ext:FormLayout>
                    </Body>
                </ext:Panel>
            </ext:Anchor>
            <ext:Anchor Horizontal="100%">
                <ext:Panel ID="Panel2" runat="server" AutoHeight="true" Border="false" BodyStyle="padding:10px;">
                    <Body>
                        <ext:FormLayout ID="FormLayout4" runat="server" LabelAlign="Left" LabelWidth="60">
                            <ext:Anchor Horizontal="100%">
                                <ext:RadioGroup runat="server" ID="Estado" FieldLabel="Estado" HideLabel="false"
                                    LabelSeparator="">
                                    <Items>
                                        <ext:Radio ID="Estado1" runat="server" BoxLabel="Estado1" HideLabel="false" />
                                        <ext:Radio ID="Radio1" runat="server" BoxLabel="Estado2" HideLabel="false" />
                                        <ext:Radio ID="Radio2" runat="server" BoxLabel="Estado3" HideLabel="false" />
                                    </Items>
                                </ext:RadioGroup>
                            </ext:Anchor>
                        </ext:FormLayout>
                    </Body>
                </ext:Panel>
            </ext:Anchor>
        </ext:FormLayout>
    </Body>
    <Buttons>
        <ext:Button runat="server" ID="btnAceptar" Text="Aceptar" Icon="Accept">
            <%--<AjaxEvents>
                                            <Click OnEvent="btnAceptar_Click">
                                                <EventMask ShowMask="true" />
                                            </Click>
                                        </AjaxEvents>--%>
        </ext:Button>
        <ext:Button runat="server" ID="btnCancelar" Text="Cancelar" Icon="Decline">
            <%--<AjaxEvents>
                                            <Click OnEvent="btnCancelar_Click">
                                                <EventMask ShowMask="true" />
                                            </Click>
                                        </AjaxEvents>--%>
        </ext:Button>
    </Buttons>
</ext:Window>
